<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\web\NotFoundHttpException;

//chỉ user hoặc khách mới có quyền
if(!Yii::$app->user->isGuest && Yii::$app->user->identity->acc_type==0)
{
	throw new NotFoundHttpException('The requested page does not exist.');
}
else
{

	/* @var $this yii\web\View */
	/* @var $searchModel app\models\ProjectSearch */
	/* @var $dataProvider yii\data\ActiveDataProvider */

	$this->title = 'Các dự án captcha';
	//$this->params['breadcrumbs'][] = $this->title;
	?>
	<div class="project-index">

		<h1><?= Html::encode($this->title) ?></h1>
		<?php // echo $this->render('_search', ['model' => $searchModel]); ?>


		<?= GridView::widget([
			'dataProvider' => $dataProvider,
			'filterModel' => $searchModel,
			'columns' => [
				['class' => 'yii\grid\SerialColumn'],
				'name',
				'rate',
				'description:ntext',
				//'guide:ntext',
				// 'link:ntext',
			],
		]); ?>

	</div>
<?php
}
?>